package com.ldc.commonres.common

import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.viewbinding.ViewBinding

abstract class VBFragment<VB : ViewBinding> : FragmentBase() {


    open var viewBind: VB? = null

    override fun loadLayoutView(inflater: LayoutInflater, container: ViewGroup?): View? {
        viewBind = loadViewBinding(inflater, container)

        return viewBind?.root
    }

    open fun loadViewBinding(inflater: LayoutInflater, container: ViewGroup?): VB =
        createViewBinding(inflater, container)

    protected abstract fun createViewBinding(inflater: LayoutInflater, container: ViewGroup?): VB





}